<template>
    <div class="buttonlist">
        <a-button type="primary" @click="toggleFn">九轴参数</a-button>
        <a-button type="primary" @click="toggleFn2">漂浮参数</a-button>
        <!-- <a-button type="primary" @click="Reflesh(500)">刷新图表(使刻度最大长度为500)</a-button> -->
    </div>
</template>

<script setup>
import eventbus from '@/until/eventbus';
import {ref} from 'vue'

let isLoad = ref(false)

function toggleFn() {
    eventbus.emit('toggle')
}
function toggleFn2() {
    eventbus.emit('toggle2')
}

function Reflesh(lengthChart) {
    isLoad.value = true
    setTimeout(function(){
        isLoad.value = false
    },1000)
    console.log(lengthChart);
    eventbus.emit('refresh', lengthChart)
}
</script>

<style>
.buttonlist {
    width: 300px;
    height: 30px;
    z-index: 1000;
    position: fixed;
    bottom: 20px;
    left: calc(50% - 150px);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
</style>